################################################################################
# Project:  external projects
# Purpose:  CMake build scripts
# Author:   Dmitry Baryshnikov, polimax@mail.ru
################################################################################
# Copyright (C) 2015, NextGIS <info@nextgis.com>
# Copyright (C) 2015 Dmitry Baryshnikov
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this script.  If not, see <http://www.gnu.org/licenses/>.
################################################################################

set(repo_name lib_jpeg)
set(repo_project jpeg)
set(repo_include)

set(JPEG12_INCLUDE_DIR ${EXT_INSTALL_DIR}/include/ CACHE PATH "Include directory for 12-bit libjpeg" FORCE)

list(APPEND find_extproject_CMAKE_ARGS -DBUILD_JPEG_12=ON -DBUILD_JPEG_8=OFF)

if(find_extproject_SHARED)
    add_definitions(-DJPEG_DLL_IMPORTS)
else()
    add_definitions(-DJPEG_STATIC)
endif()
